package com.zlsy.springbootdemo.chainofresponsibility.mtdemo1;

/**
 * @author zhouliang
 * @date 2021/1/23 14:51
 */
public class Client {
  public static void main(String[] args) {
    HandleRuleA handleRuleA = new HandleRuleA(1);
    HandleRuleB handleRuleB = new HandleRuleB(2);
    // 这是重点，将handleA和handleB串起来
    handleRuleA.setNextHandler(handleRuleB);
    handleRuleA.echo(new Request());
  }
}
